#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_pushButton_clicked()
{

    QString label = "你今天的任务是: ";
   if(ui->checkBox_learn->isChecked())
   {
        label += ui->checkBox_learn->text() + " ";
        ui->label->setText(label);
   }

    if(ui->checkBox_game->isChecked())
    {
        label += ui->checkBox_game->text() + " ";
        ui->label->setText(label);
    }

    if(ui->checkBox_work->isChecked())
    {
        label += ui->checkBox_work->text() + " ";
        ui->label->setText(label);
    }
}
